<template>
  <div class="update-setting">
    <el-form ref="form" :model="form" label-width="80px">
      <!-- <el-form-item label="爬取频率">
        <el-input v-model="form.name" style="width:80%;" type="number" /> 条/次
      </el-form-item> -->
      <el-form-item label="爬取类型">
        <el-radio-group v-model="type">
          <el-radio :label="1">课程</el-radio>
          <el-radio :label="2">期数</el-radio>
          <el-radio :label="3">评论</el-radio>
          <el-radio :label="4">教师</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-button class="btn" type="primary" @click="saveType">保存</el-button>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {},
      type: +localStorage.type || 1
    }
  },
  methods: {
    saveType() {
      localStorage.setItem('type', this.type)
      this.$message.success('保存成功')
    }
  }
}
</script>

<style lang="scss" scoped>
.update-setting{
  position: relative;
  height: calc(100vh - 90px);
  .btn{
    position: absolute;
    right: 20px;
    bottom: 40px;
  }
}
::v-deep .el-input__inner{
  height: 30px;
  padding: 0 10px;
}
</style>
